package com.cjl.server.handler.nettyHandler.normal;

import com.cjl.constrants.ResultCode;
import com.cjl.message.DeleteMessage;
import com.cjl.message.ResponseMessage;
import com.cjl.message.hashMessage.HGetMessage;
import com.cjl.server.handler.CommonHandler;
import com.cjl.server.handler.HandlerManager;
import com.cjl.server.session.Session;
import com.cjl.server.store.HbCache;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

@ChannelHandler.Sharable
public class DeleteMessageHandler extends SimpleChannelInboundHandler<DeleteMessage> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, DeleteMessage msg) throws Exception {
        ResponseMessage responseMessage = HandlerManager.process(msg);
        ctx.writeAndFlush(responseMessage);
    }
}
